Creating an Adapter Project
Describes how to create an adapter project.
Pre or Post Processor
Procedure
-
To create an adapter project, use the create-adapter script in the terminal or command prompt.
- Command for Linux or MacOS X:
/home/user/MasheryLocalSDK$ ./create-adapter.sh --project-name MyCustomAdapter --adapter-type TrafficEventListener --adapter-name MyCustomProcessor --package-name com.companyname.apim.adapter- Command for MS Windows:
C:\Users\Administrator\MasheryLocalSDK> create-adapter.bat --project-name MyCustomAdapter --adapter-type TrafficEventListener --adapter-name MyCustomProcessor --package-name com.companyname.apim.adapter -
Change the project name, adapter name, and package name. Running the script for the first time downloads the necessary Gradle binaries.
-
Open the JAVA source MyCustomProcessor.java in a text editor and write the processing logic for pre and post processing.
Custom Authenticator
Procedure
-
To create an adapter project, use the create-adapter script in the terminal or command prompt.
- Command for Linux or MacOS X:
/home/user/MasheryLocalSDK$ ./create-adapter.sh --project-name MyCustomAdapter --adapter-type Authenticator --adapter-name MyCustomAuthenticator --package-name com.companyname.apim.adapter- Command for MS Windows:
C:\Users\Administrator\MasheryLocalSDK> create-adapter.bat --project-name MyCustomerAdapter --adapter-type Authenticator --adapter-name MyCustomAuthenticator --package-name com.companyname.apim.adapter -
Change the project name, adapter name, and package name. Running the script for the first time downloads the necessary Gradle binaries.
-
Open the JAVA source
MyCustomProcessor.javain a text editor and implement authenticator logic.For more information to edit in an IDE, refer to Using the Adapter SDK in and IDE.
For more information, refer to the examples in the Extending Functionality of the TrafficManager section available under Developing Processors and Adapters.